package rlm.rlcontainer;

import linearProgramming.Variable;


public abstract class BiPartitionPlaceHolder<T extends Variable> extends CompoundPlaceHolder {

	private T innerTab;
	
	public BiPartitionPlaceHolder(PlaceHolder a, PlaceHolder b){
		super("Place"+count++);
		addChild(a);
		addChild(b);
		
		addInnerRelation();
	}
	
	public T getInnerTab(){
		return innerTab;
	}
	
	public void setInnerTab(T tab){
		this.innerTab = tab;
	}
	
	protected abstract void addInnerRelation();
	protected PlaceHolder get0(){
		return getChild(0);
	}
	
	protected PlaceHolder get1(){
		return getChild(1);
	}
	
	public int getXCount(){
		return get0().getXCount() + get1().getXCount();
	}
	
	public int getYCount(){
		return get0().getYCount() + get1().getYCount();
	}
	
}
